public class SelectSort extends SortAlgorithmAdapter {

	@Override
	protected void sortArray() {
		int len = this.arrayLen;
		
		for(int i = 0; i < len - 1; i++) {
			int index = i;
			
			for(int j = i + 1; j < len; j++) {
				if (this.array[j] < this.array[index] ) {
					index = j;
				}
			}
			
			int tmp = this.array[index];
			this.array[index] = this.array[i];
			this.array[i] = tmp;
		}
	}

}
